Optimal. Leaf size=57 \[ -\frac {a^2 \sin ^3(c+d x)}{3 d}+\frac {2 a^2 \sin (c+d x)}{d}+\frac {a^2 \sin (c+d x) \cos (c+d x)}{d}+a^2 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {3788, 2635, 8, 4044, 3013} \[ -\frac {a^2 \sin ^3(c+d x)}{3 d}+\frac {2 a^2 \sin (c+d x)}{d}+\frac {a^2 \sin (c+d x) \cos (c+d x)}{d}+a^2 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2635
Rule 3013
Rule 3788
Rule 4044
Rubi steps
\begin {align*} \int \cos ^3(c+d x) (a+a \sec (c+d x))^2 \, dx &=\left (2 a^2\right ) \int \cos ^2(c+d x) \, dx+\int \cos ^3(c+d x) \left (a^2+a^2 \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a^2 \cos (c+d x) \sin (c+d x)}{d}+a^2 \int 1 \, dx+\int \cos (c+d x) \left (a^2+a^2 \cos ^2(c+d x)\right ) \, dx\\ &=a^2 x+\frac {a^2 \cos (c+d x) \sin (c+d x)}{d}-\frac {\operatorname {Subst}\left (\int \left (2 a^2-a^2 x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=a^2 x+\frac {2 a^2 \sin (c+d x)}{d}+\frac {a^2 \cos (c+d x) \sin (c+d x)}{d}-\frac {a^2 \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.09, size = 41, normalized size = 0.72 \[ \frac {a^2 (21 \sin (c+d x)+6 \sin (2 (c+d x))+\sin (3 (c+d x))+12 d x)}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.55, size = 49, normalized size = 0.86 \[ \frac {3 \, a^{2} d x + {\left (a^{2} \cos \left (d x + c\right )^{2} + 3 \, a^{2} \cos \left (d x + c\right ) + 5 \, a^{2}\right )} \sin \left (d x + c\right )}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.80, size = 80, normalized size = 1.40 \[ \frac {3 \, {\left (d x + c\right )} a^{2} + \frac {2 \, {\left (3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 8 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.90, size = 64, normalized size = 1.12 \[ \frac {\frac {a^{2} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}+2 a^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+a^{2} \sin \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.73, size = 61, normalized size = 1.07 \[ -\frac {2 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{2} - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} - 6 \, a^{2} \sin \left (d x + c\right )}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.66, size = 61, normalized size = 1.07 \[ a^2\,x+\frac {5\,a^2\,\sin \left (c+d\,x\right )}{3\,d}+\frac {a^2\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d}+\frac {a^2\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{2} \left (\int 2 \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \cos ^{3}{\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}\, dx + \int \cos ^{3}{\left (c + d x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________